(function($) {
	$.validator.setDefaults({
				submitHandler : function() {
					alert("submitted!");
				},
				showErrors : function(map, list) {
					// there's probably a way to simplify this

					this.currentElements.removeAttr("title")
							.removeClass("tooltips error");
					$.each(list, function(index, error) {
								$(error.element).attr("title", error.message)
										.addClass("tooltips error");
							});
				}
			});

})(jQuery);